package com.example.yyg.springframework.util;

import com.example.yyg.springframework.core.io.ClassPathResource;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author: 冰岩
 * @Date: 2023/06/26
 * @Description:
 */
@Slf4j
public class ClassUtils {

    public static ClassLoader getDefaultClassLoader() {
        ClassLoader cl = null;
        try {
            cl = Thread.currentThread().getContextClassLoader();
        }catch (Exception e) {
            log.warn("getContextClassLoader fail");
        }
        if (cl == null) {
            cl = ClassUtils.class.getClassLoader();
        }
        return cl;
    }

}
